#ifndef __EPOLL_H__
#define __EPOLL_H__
#include <map>
#include <sys/epoll.h>

class Epoll
{
protected:
	int m_fd;
	int m_count;
	struct epoll_event nullevent;
	struct epoll_event *m_events;
public:
	Epoll(void);
	~Epoll(void);
public:
	bool Open(int);
	bool Close(void);
public:
	bool AddEvent(int, int);
	bool DelEvent(int, int);
	int WaitEvent(int);
public:
	struct epoll_event& operator[](int);
};

#endif//__EPOLL_H__
